Skip to content

feat(desktop): InlineDiff component for compact before/after tool results#3129

Merged
esengine merged 1 commit into
esengine:main-v2from
HUQIANTAO:feat/inline-diff
Jun 7, 2026
Merged

feat(desktop): InlineDiff component for compact before/after tool results#3129
esengine merged 1 commit into
esengine:main-v2from
HUQIANTAO:feat/inline-diff

Conversation

@HUQIANTAO

Copy link
Copy Markdown
Contributor

The Edit / MultiEdit / sed-style bash tool results all carry a before/after pair, but today the only way to see the diff is the full DiffView, which lives in the workspace panel and requires opening a side pane.

Add components/InlineDiff.tsx: a compact, expandable diff card that fits inside a tool result. It calls the existing diffLines() from lib/diff (the same seam DiffView uses) and renders a unified diff with +/- row coloring from the existing --add-bg / --del-bg tokens.

Folds at 12 rows by default; the footer shows the hidden count and expands on click. The header shows the filename (truncated middle-ellipsis if long), +/- counts, and a Copy button.

@github-actions github-actions Bot added the v2 Go rewrite (1.x) — main-v2 branch, active development label Jun 4, 2026
…ults

The Edit / MultiEdit / sed-style bash tool results all carry a
before/after pair, but today the only way to see the diff is the
full DiffView, which lives in the workspace panel and requires
opening a side pane. Users scroll back to the turn that made the
edit, then context-switch to the workspace — friction during the
exact moment they're verifying the agent's work.

Add components/InlineDiff.tsx: a compact, expandable diff card that
fits inside a tool result. It calls the existing diffLines() from
lib/diff (the same seam DiffView uses) and renders a unified diff
with +/- row coloring from the existing --add-bg / --del-bg tokens.

Behavior:
  - Folds at 12 rows by default; the footer shows the hidden count
    and expands on click. (12 covers ~80% of real edits; longer
    diffs usually have big function rewrites the user DOES want to
    see in full, so a single click reveals them.)
  - The header shows the filename (truncated middle-ellipsis if
    long), +/- counts, and a Copy button that writes a plain-text
    unified diff to the clipboard.
  - Reuses the same monospace family / spacing / surface tokens
    as the rest of the chat, so it sits inside any tool card
    without a wrapper.

The component is standalone — it doesn't reach into the controller
or assume a particular caller. The follow-up is a one-line import
in ToolCard.tsx that wraps Edit/MultiEdit results in <InlineDiff />
once the tool's before/after shape is exposed on the item.
@HUQIANTAO HUQIANTAO requested a review from SivanCola as a code owner June 4, 2026 16:36
@esengine esengine merged commit c368229 into esengine:main-v2 Jun 7, 2026
8 checks passed
CVEngineer66 pushed a commit to CVEngineer66/DeepSeek-Reasonix that referenced this pull request Jun 7, 2026
The .onboarding__skip:disabled block was missing its closing '}', causing
esbuild (used by Vite dev mode) to abort CSS parsing at line 7049. All
rules after line 7049 — including .workbench-dock layout positioning —
were silently discarded, breaking the right-side dock layout.

Introduced as a merge conflict artefact between esengine#2752 (onboarding) and
esengine#3129 (InlineDiff component).
CVEngineer66 pushed a commit to CVEngineer66/DeepSeek-Reasonix that referenced this pull request Jun 7, 2026
A second merged conflict artefact from esengine#2752 (onboarding) and esengine#3129
(InlineDiff) left an unclosed block at line 7082. Same root cause as
PR esengine#3418 but at a different offset. The check-css-syntax.mjs script
(PR esengine#3420) now catches this, but upstream itself is affected.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants